home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d7 / itqwk07m.arc / ITQWK07.SCR next >
Text File  |  1990-05-17  |  9KB  |  284 lines

  1. ;            **********  DEV07.SCR   **********
  2. ;
  3. ;   05-17-90
  4. ;
  5. ;   Typo gremlins had been at work in DEV06.SCR.  Caught two.
  6. ;
  7. ;   Modified some Colorbg/Colorfg parameters.
  8. ;
  9. ;   Added code to create QWKNUM.DAT in QMODEM default directory on
  10. ;   first run of script. (I know a good idea when I hear one, Dan)
  11. ;
  12. ;   05-14-90
  13. ;
  14. ;   Logic limiting qwknum.dat to range from 02 - 98 was broken. Fixed in
  15. ;   DEV06.SCR
  16. ;
  17. ;   05-13-90
  18. ;   The Ivory Tower (203)649-5611, LEADERS Directory posting
  19. ;
  20. ;   Development release of QMODEM 4.x script for use with Qmail 3.0
  21. ;    on PCBoard BBSs running ProLogon/ProDoor by users of either
  22. ;    EZ-RDR or Qmail Deluxe Reader.
  23. ;
  24. ;  EZ-RDR/QMODEM users:  I've written the following script so that
  25. ;  it should be useable with either the EZ-RDR or the Qmail Deluxe
  26. ;  packet masks.  Though I am a registered user of EZ-RDR I also
  27. ;  received Qmail Deluxe Reader when I registered Qmail 3.0 and plan
  28. ;  to use it.  But - lots of respectable folks prefer EZ-RDR to the
  29. ;  either Deluxe or the shareware Qmail Reader so this script is for
  30. ;  all.  There will be more detailed documentation for this script
  31. ;  when it's eventually posted on boards other than the Tower but
  32. ;  for now "... your mission if you should decide to accept it" is to
  33. ;  install this QMODEM 4.x script with a minimum of written guidance
  34. ;  and give it a spin.  I'd appreciate hearing about any problems
  35. ;  you encounter in installing or using it.  I've addressed this to
  36. ;  EZ-RDR users because I can test the script with Qmail Deluxe myself.
  37. ;
  38. ;  This script will read from a file named QWKNUM.DAT that will be
  39. ;  created in the directory you identify as your QMODEM default
  40. ;  directory (where QMODEM.EXE is located). The two place numeral
  41. ;  in QWKNUM.DAT will be used in the sequential renaming of packets
  42. ;  of mail downloaded from Qmail 3.0.
  43. ;
  44. ;  EZ-RDR uses the packet mask *.QWK (and will choke if the files in
  45. ;  your EZ-RDR DL directory do not all have a QWK extension).  Qmail
  46. ;  Deluxe uses the packet mask *.Q* and will happily read files named
  47. ;  such things as IVORY.QWK, IVORY.QW0, or IVORY.Q10; in fact, Qmail
  48. ;  3.0 itself assigns the extensions QWK, QW0, QW1, QW2, and so on
  49. ;  to each packet that is DLed in a single session.  So, unless the
  50. ;  extension is massaged into the form QWK, one or the other of these
  51. ;  Readers is going to be unhappy some of the time.  This script does
  52. ;  that; when all the dust has settled all of the packets in the
  53. ;  Reader DL directory have the extension QWK.
  54. ;
  55. ;  This script will read the QWKNUM.DAT file and assign the numeral
  56. ;  it contains to the filename of the packet - in the form of IVORY10.QWK,
  57. ;  for example.  That way, both readers will be happy. It will also change
  58. ;  the numeral found in the QWKNUM.DAT file each time a packet is DLed so
  59. ;  that successive packets will be named (say) IVORY10.QWK, IVORY11.QWK,
  60. ;  IVORY12.QWK and so on up to IVORY99.QWK (at which time the series will
  61. ;  start all over again with IVORY02.QWK (the numerals 1 thru 9 are changed
  62. ;  by the script to the form 01, 02, 03, 04 etc. so that when sorted and
  63. ;  listed on the menu of the Reader they will be arranged in order according
  64. ;  to the ASCII value of the filename (oldest to newest).
  65. ;
  66. ;  Lastly, this script will copy the DLed packet from the QMODEM DL
  67. ;  directory to the Reader DL directory and then delete the packet
  68. ;  from the former directory.  It will also check for *.REP (reply)
  69. ;  files in the directory to which the Reader has written them, UL
  70. ;  the replies if any are found, and then delete the replies after
  71. ;  they have been ULed.
  72. ;
  73. ;  After a packet has been DLed, a Menu of Choices will be displayed from
  74. ;  which the user may select (A) Exit to the BBS, (B) Get More Mail, or
  75. ;  (C) Hangup.  If a second packet of mail is DLed, its filename too will
  76. ;  have a numeral inserted so that unless more than 99 mail packets are
  77. ;  allowed to accumulate in the Reader DL directory, all filenames will
  78. ;  be unique and so will not be overwritten by later mail packets.
  79. ;
  80. ;
  81. ;  Qwick (and brief) installation instructions follow:
  82. ;  1. Set QMODEM in AutoZ mode in Alt-N (as written this script uses Zmodem
  83. ;     to take advantage of the QMODEM 4.x feature allowing a Zmodem transfer
  84. ;     to begin immediately if there is a external batch call to dsz.com by
  85. ;     the letter Z and the Zmodem "start header" is received)
  86. ;  2. Adjust the string and path specifications to suit the directory
  87. ;     names and paths on your own system.
  88. ;  3. Call a PCBoard BBS running ProLogon/ProDoor (if your favorite BBS
  89. ;     uses only PCBoard you may have to adjust the prompts in this version
  90. ;     of the script but those that are unique to PCBoard on the Tower have
  91. ;     been inserted in the present script.
  92. ;  4. You must configure the Qmail Conferences and Options you wish to
  93. ;     use and may then call back using this script to DL the mail in those
  94. ;     Conferences.
  95. ;  5. Let me know what happens.
  96. ;
  97. ;
  98. ;   Qmail Deluxe/Ez-Rdr/ProLogon/ProDoor/Qmodem QMODEM script
  99. ;
  100. Graphics ANSI
  101. TurnON   8_BIT
  102. TurnOFF  LINEFEED
  103. TurnOFF  XON/XOFF
  104. TurnON   NOISE
  105. TurnOFF  MUSIC
  106. TurnON   SCROLL
  107. TurnOFF  PRINT
  108. TurnOFF  ECHO
  109. TurnOFF  SPLIT
  110. TurnOFF  BS_DEL
  111.  
  112.  
  113. String  BBSID DLPATH QMDIR QWKPATH QWKDAT WILD STEM TAIL
  114.  
  115. ASSIGN  BBSID     IVORY.Q
  116. ASSIGN  DLPATH    D:\               ;QMODEM DL path (terminal \ required)
  117. ASSIGN  QMDIR     C:\QMODM\         ;QMODEM default directory
  118. ASSIGN  QWKPATH   D:\DX11\QWK\      ;Qmail/Ez-Rdr DL path with terminal \
  119. ASSIGN  QWKDAT    QWKNUM.DAT        ;Enumeration file for packet renaming
  120. ASSIGN  STEM      IVORY             ;BBS ID code used by Qmail
  121. ASSIGN  WILD      *                 ;DOS wildcard
  122. ASSIGN  TAIL      .QWK              ;the extension (with prepended .) needed
  123.  
  124. TimeOut  240     ; Set Waitfor for 30 seconds
  125.  
  126. Waitfor  "graphics: (Enter)=no?"
  127. Delay    100
  128. Send     "y q Karl Hakmiller $password NS^M"   ;COLOR, ProDoor login
  129. ;Send    "y q Karl Hakmiller $password 3 NS^M" ;COLOR, PCBoard login
  130. ;Send    "n q Karl Hakmiller $password NS^M"   ;MONO, ProDoor login
  131. ;Send    "n q Karl Hakmiller $password 3 NS^M" ;MONO, PCBoard login
  132.  
  133. When
  134. When     "Press (Enter) to continue" "^M"
  135. When     "(0) Command?" "OPEN 3^M"             ;ProDoor logins
  136.  
  137. START:
  138. Waitfor  "Qmail Command?"
  139. Delay    100
  140. Send     "d^M"
  141.  
  142. Waitfor  "Download this packet (Y or N)?"
  143. Delay    100
  144. Send     "y^M"
  145.  
  146. SETNUM:
  147. EXIST $QMDIR$QWKDAT OPEN1
  148. Openfile QWKNUM.DAT Rewrite ;creates the file QWKNUM.DAT if doesn't exist
  149. Assign 1 1
  150. Writefile 1 1               ;writes the numeral 1 to the QWKNUM.DAT file
  151. Closefile
  152.  
  153. OPEN1:
  154. Openfile QWKNUM.DAT Read
  155. Readfile 1                  ;reads QWKNUM.DAT content as integer value
  156.   Incr 1                    ;adds 1 to qwknum numeral in QWKNUM.DAT
  157.   Assign 0 $1               ;creates string variable equal to integer read
  158.   If "$0" >= "99"  RESETIT  ;tests for limit of qwknum numeral
  159.   If "$0" <= "9"   PADIT    ;tests for size of qwknum numeral
  160.  Closefile
  161. Goto OPEN2
  162.  
  163. RESETIT:
  164.  Closefile
  165.   Openfile QWKNUM.DAT Rewrite
  166.     Assign   0 1                    ;resets $0 (99) to 1
  167.     Writefile 1                     ;writes 1 to QWKNUM.DAT
  168.   Closefile
  169.  Goto OPEN1
  170.  
  171. PADIT:                              ;pads qwknum numerals < 10 with right 0
  172.  Closefile
  173.  Openfile QWKNUM.DAT Rewrite
  174.    Assign 2 0
  175.    Assign 1 "$2$1"                  ;resets $1 (n < 10) to 0n)
  176.  Writefile $1                       ;writes 0n to QWKNUM.DAT
  177.  Closefile
  178.  Goto WORKING1
  179.  
  180.  
  181. OPEN2:
  182.  Closefile
  183.  Openfile QWKNUM.DAT Rewrite
  184.  Writefile $1
  185.  Closefile
  186.  
  187. WORKING1:
  188. When
  189. Waitfor  "*"
  190. Downld Z $BBSID$WILD
  191. LoadFON  C:\QMODM\QMODEM.FON
  192.  
  193. DOS "RENAME $DLPATH$BBSID$WILD $STEM$1$TAIL         ;renames packet
  194. DOS "COPY $DLPATH$STEM$1$TAIL $QWKPATH$STEM$1$TAIL" ;copies renamed packet
  195. DOS "DEL $DLPATH$STEM$1$TAIL"                       ;deletes original packet
  196.  
  197. CHEKREP:
  198. EXIST D:\DX11\REP\IVORY.REP UPREP      ;filespec of replies file
  199. Goto Menu                              ;if no reply file skip UPREP
  200.  
  201. UPREP:
  202. Send     "^M"
  203. Waitfor  "Qmail Command?"
  204. Delay    100
  205. Send     "u^M"
  206. Delay    100
  207. Upload   Z D:\DX11\REP\IVORY.REP        ;Uploads replies with Zmodem
  208. LoadFON  C:\QMODM\QMODEM.FON
  209. DOS      "DEL D:\DX11\REP\IVORY.REP"    ;deletes replies once uploaded
  210.  
  211.  
  212. MENU:
  213. Send    "^M"
  214. Waitfor "Qmail Command?"
  215. Pause   500
  216. Getscr
  217. Clrscr
  218. Colorbg 0
  219. Colorfg 0
  220. Box     1 1 80 24
  221. Colorbg 1
  222. Colorfg 14
  223. Box     17 2 57 9
  224. Clrscr
  225.  
  226. Displayln   "     Make A Choice (A,B,C):  "
  227. Displayln   "       (A) Quit To BBS "
  228. Displayln   "       (B) Get More Mail "
  229. Displayln   "       (C) Hangup "
  230. Display     "        ? "
  231. Colorbg  0
  232. Colorfg  3
  233.  
  234. CHOICE:
  235. INKEY 8
  236. If  "$8"  =  "a" bbs
  237. If  "$8"  =  "b" more
  238. If  "$8"  =  "c" getout
  239. If  "$8"  <  "a" menu
  240. If  "$8"  >  "c" menu
  241.  
  242. BBS:
  243. Clrscr
  244. Colorbg 0
  245. Colorfg 15
  246. Box 1 1 80 24
  247. Send "^M"
  248. Waitfor   "Command?"
  249. Send "Q^M"
  250. Exit
  251.  
  252. MORE:
  253. Clrscr
  254. Colorbg 0
  255. Colorfg 15
  256. Box 1 1 80 24
  257. Send "^M"
  258. Delay 100
  259. Goto START
  260.  
  261. GETOUT:
  262. Colorbg 0
  263. Colorfg 0
  264. Box 1 1 80 24
  265. Send "^M"
  266. Clrscr
  267. Putscr
  268. Send "G^M"
  269. Delay 100
  270. Colorbg 0
  271. Colorfg 0
  272. Box 1 1 80 24
  273. Hangup
  274. Waitfor  "OK"
  275. Clrscr
  276. ATwrite 15 13 15  "QMAIL transferred from $STEM at $TIME on $DATE"
  277. Delay 3000
  278. Colorbg 0
  279. Colorfg 15
  280. Box 1 1 80 24
  281. Clrscr
  282. Exit
  283.  
  284.